TCanvas* plotter(TString plot, TString text, TString title_text, 
		 double cxn_QCD=7.60016e9, 
		 double cxn_glu1=0.287e8, 
		 double cxn_glu2=92.6e3, 
		 double cxn_glu3=1.01e3, 
		 double cxn_glu4=.435e2)
{

  gStyle->SetOptStat("");

  TCanvas* c1=new TCanvas("plot", "plot", 800, 450);
  cd 
  TH1D* qcd_nevt= (TH1D*) _file0->Get("nevt");
  TH1D* glu1_nevt= (TH1D*) _file1->Get("nevt");
  TH1D* glu2_nevt= (TH1D*) _file2->Get("nevt");
  TH1D* glu3_nevt= (TH1D*) _file3->Get("nevt");
  TH1D* glu4_nevt= (TH1D*) _file4->Get("nevt");
  
  double qcd_scale= cxn_QCD/ qcd_nevt->GetBinContent(1);
  double glu1_scale= cxn_glu1/ glu1_nevt->GetBinContent(1);
  double glu2_scale= cxn_glu2/ glu2_nevt->GetBinContent(1);
  double glu3_scale= cxn_glu3/ glu3_nevt->GetBinContent(1);
  double glu4_scale= cxn_glu4/ glu4_nevt->GetBinContent(1);
  
  TH1D* qcd_plot= (TH1D*) _file0->Get(plot);
  TH1D* glu1_plot= (TH1D*) _file1->Get(plot);
  TH1D* glu2_plot= (TH1D*) _file2->Get(plot);
  TH1D* glu3_plot= (TH1D*) _file3->Get(plot);
  TH1D* glu4_plot= (TH1D*) _file4->Get(plot);
  
  vector<TH1D*> v_his;
  v_his.push_back(qcd_plot);
  v_his.push_back(glu1_plot);
  v_his.push_back(glu2_plot);
  v_his.push_back(glu3_plot);
  v_his.push_back(glu4_plot);
  
  for(int i=0; i<v_his.size(); i++)
    {
      v_his[i]->Rebin(4);
      v_his[i]->SetMarkerStyle(1);
      v_his[i]->SetFillStyle(0);

    }


  
  qcd_plot->Scale(qcd_scale);
  glu1_plot->Scale(glu1_scale);
  glu2_plot->Scale(glu2_scale);
  glu3_plot->Scale(glu3_scale);
  glu4_plot->Scale(glu4_scale);

  
  qcd_plot->SetLineColor(kBlack);
  glu1_plot->SetLineColor(kBlue);
  glu2_plot->SetLineColor(kGreen);
  glu3_plot->SetLineColor(kMagenta);
  glu4_plot->SetLineColor(kBlue);

  qcd_plot->SetMarkerColor(kBlack);
  glu1_plot->SetMarkerColor(kBlue);
  glu2_plot->SetMarkerColor(kGreen);
  glu3_plot->SetMarkerColor(kMagenta);
  glu4_plot->SetMarkerColor(kBlue);
  

  qcd_plot->SetTitle("QCD "+text);
  glu1_plot->SetTitle("100 GeV #tilde{g} "+text);
  glu2_plot->SetTitle("300 GeV #tilde{g} "+text);
  glu3_plot->SetTitle("600 GeV #tilde{g} "+text);
  glu4_plot->SetTitle("900 GeV #tilde{g} "+text);

  qcd_plot->Draw("hist c");
  glu1_plot->Draw("hist c same");
  glu2_plot->Draw("hist c same");
  glu3_plot->Draw("hist c same");
  glu4_plot->Draw("hist c same");
  c1->SetBorderMode(0);
  
  

  return c1;
}
